<?php 
	if (isset($_POST['CapNhat']))
	{
		$MaLoai = $_REQUEST['MaLoai'];
		$TenLoai = $_REQUEST['TenLoai'];
		$TenChiTietLoai =$_REQUEST['TenChiTietLoai'];
		include "connection.php";
		$sql="UPDATE loaisanpham SET TenLoai='".$TenLoai."', TenChiTietLoai='".$TenChiTietLoai."'
		WHERE MaLoai='" .$MaLoai."'";
		if (!mysql_query($sql))
		{
			die('Error: ' . mysql_error());
		}
		header("location:../MyModel/TrangAD_qlloai.php");
		mysql_close($con);
	}
?>